Main Page   Modules   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

mesh.h File Reference

#include <lib3ds/types.h>

Include dependency graph for mesh.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Compounds

struct  _Lib3dsBoxMap
struct  _Lib3dsFace
struct  _Lib3dsMapData
struct  _Lib3dsMesh
struct  _Lib3dsPoint

Typedefs

typedef _Lib3dsPoint Lib3dsPoint

Enumerations

enum  Lib3dsMapType { LIB3DS_MAP_NONE = 0xFFFF, LIB3DS_MAP_PLANAR = 0, LIB3DS_MAP_CYLINDRICAL = 1, LIB3DS_MAP_SPHERICAL = 2 }

Functions

LIB3DSAPI Lib3dsMeshlib3ds_mesh_new (const char *name)
LIB3DSAPI void lib3ds_mesh_free (Lib3dsMesh *mesh)
LIB3DSAPI Lib3dsBool lib3ds_mesh_new_point_list (Lib3dsMesh *mesh, Lib3dsDword points)
LIB3DSAPI void lib3ds_mesh_free_point_list (Lib3dsMesh *mesh)
LIB3DSAPI Lib3dsBool lib3ds_mesh_new_flag_list (Lib3dsMesh *mesh, Lib3dsDword flags)
LIB3DSAPI void lib3ds_mesh_free_flag_list (Lib3dsMesh *mesh)
LIB3DSAPI Lib3dsBool lib3ds_mesh_new_texel_list (Lib3dsMesh *mesh, Lib3dsDword texels)
LIB3DSAPI void lib3ds_mesh_free_texel_list (Lib3dsMesh *mesh)
LIB3DSAPI Lib3dsBool lib3ds_mesh_new_face_list (Lib3dsMesh *mesh, Lib3dsDword flags)
LIB3DSAPI void lib3ds_mesh_free_face_list (Lib3dsMesh *mesh)
LIB3DSAPI void lib3ds_mesh_bounding_box (Lib3dsMesh *mesh, Lib3dsVector min, Lib3dsVector max)
LIB3DSAPI void lib3ds_mesh_calculate_normals (Lib3dsMesh *mesh, Lib3dsVector *normalL)
LIB3DSAPI void lib3ds_mesh_dump (Lib3dsMesh *mesh)
LIB3DSAPI Lib3dsBool lib3ds_mesh_read (Lib3dsMesh *mesh, Lib3dsIo *io)
LIB3DSAPI Lib3dsBool lib3ds_mesh_write (Lib3dsMesh *mesh, Lib3dsIo *io)


Function Documentation

LIB3DSAPI void lib3ds_mesh_bounding_box Lib3dsMesh   mesh,
Lib3dsVector    min,
Lib3dsVector    max
 

LIB3DSAPI void lib3ds_mesh_calculate_normals Lib3dsMesh   mesh,
Lib3dsVector   normalL
 

Calculates the vertex normals corresponding to the smoothing group settings for each face of a mesh.

Parameters:
mesh A pointer to the mesh to calculate the normals for.
normalL A pointer to a buffer to store the calculated normals. The buffer must have the size: 3*sizeof(Lib3dsVector)*mesh->faces.
To allocate the normal buffer do for example the following:
  Lib3dsVector *normalL = malloc(3*sizeof(Lib3dsVector)*mesh->faces);
 

To access the normal of the i-th vertex of the j-th face do the following:

   normalL[3*j+i]
 

LIB3DSAPI void lib3ds_mesh_dump Lib3dsMesh   mesh
 

This function prints data associated with the specified mesh such as vertex and point lists.

Parameters:
mesh Points to a mesh that you wish to view the data for.
Returns:
None
Warning:
WIN32: Should only be used in a console window not in a GUI.

LIB3DSAPI void lib3ds_mesh_free Lib3dsMesh   mesh
 

LIB3DSAPI void lib3ds_mesh_free_face_list Lib3dsMesh   mesh
 

LIB3DSAPI void lib3ds_mesh_free_flag_list Lib3dsMesh   mesh
 

LIB3DSAPI void lib3ds_mesh_free_point_list Lib3dsMesh   mesh
 

LIB3DSAPI void lib3ds_mesh_free_texel_list Lib3dsMesh   mesh
 

LIB3DSAPI Lib3dsMesh* lib3ds_mesh_new const char *    name
 

LIB3DSAPI Lib3dsBool lib3ds_mesh_new_face_list Lib3dsMesh   mesh,
Lib3dsDword    flags
 

LIB3DSAPI Lib3dsBool lib3ds_mesh_new_flag_list Lib3dsMesh   mesh,
Lib3dsDword    flags
 

LIB3DSAPI Lib3dsBool lib3ds_mesh_new_point_list Lib3dsMesh   mesh,
Lib3dsDword    points
 

LIB3DSAPI Lib3dsBool lib3ds_mesh_new_texel_list Lib3dsMesh   mesh,
Lib3dsDword    texels
 

LIB3DSAPI Lib3dsBool lib3ds_mesh_read Lib3dsMesh   mesh,
Lib3dsIo   io
 

LIB3DSAPI Lib3dsBool lib3ds_mesh_write Lib3dsMesh   mesh,
Lib3dsIo   io
 


Generated on Mon Sep 12 20:10:09 2005 for Destiny3D by doxygen1.3-rc3